HTML 2.0 Checked!

Content Models in the
HTML 2.0, HTML 3.0, and HTML 3.2 DTDs

Introduction

These pages are an attempt to help answer the question Which HTML tags are legal where and why?

To do this, I found out a little about SGML and then worked through the public texts of the DTDs for HTML 2.0, HTML 3.0, and now HTML 3.2 (aka Wilbur). The result is a set of hierarchical lists of content models from the DTDs. These lists, or trees, show where elements are valid in an HTML document. Each element in the trees has a link to the relevant section heading in the text of the DTD itself.

For authoritative sources of information, the best place to start is The World Wide Web Consortium's HTML page. The beginner's guide to SGML found at A Gentle Introduction to SGML was also extremely useful.

The Content Model Trees

A Little Bit of SGML
An introduction to some aspects of SGML syntax needed for understanding the HTML DTDs
HTML 2.0 DTD Trees
Hierarchical lists of HTML 2.0 content models based on the DTD dated 21 September 1995
HTML 3.0 DTD Trees
Hierarchical lists of HTML 3.0 content models based on the expired DTD dated 24 March 1995 and The HTML Table DTD in the W3C Working Draft 23-Jan-96.
HTML 3.2 DTD Trees
Hierarchical lists of HTML 3.2 content models based on the pre-release DTD dated 31 May 1996. According to the DTD, "This is subject to change, pending final approval by the W3C member companies" (At least it is clear who is driving the boat - and you had better believe them about changes: <FONT face="..."> was in the 23 April DTD, but face disappeared from the 15 May release; U did not appear until the 31 May release). The DTD also states "HTML 3.2 aims to capture recommended practice as of early '96". I think the word "recommended" must have been inserted by mistake. Maybe I just don't adapt well to change.

Validation

Browsers are not reliable validators for web pages because they tend to be very (too?) forgiving of errors. However, some are more forgiving than others, so a page containing errors may look good in one particular browser but may be a real mess when viewed with another browser. Mark Gaither's HTML Validation Service (formerly at Halsoft) can be used to check pages for errors (and The Unofficial WebTechs Validator FAQ can then be used to find out what all those error messages mean). The Kinder, Gentler HTML Validator has already added the HTML 3.2 DTD to its catalog. This validator requires a doctype at the beginning of each document (unless you are using HTML 2.0); to validate using the HTML 3.2 DTD, the doctype required is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">. The Weblint validator, which also performs some limited style checking, is another a useful resource.

Selected HTML 3.0 Examples

I have now constructed some HTML 3.0 test pages which, by their nature, are ugly, but which may be of interest (particularly if you are interested in finding out how the HTML 3.0 elements are used and how much of the HTML 3.0 draft Specification your browser supports).


[Top of page] [A Little Bit of SGML] [HTML 2.0 DTD Trees] [HTML 3.0 DTD Trees] [HTML 3.2 DTD Trees] [HTML 3.0 Examples] [AWPA Useful Box] [Di's home page]


Last updated: 11 June 1996 by dkgsoft@ozemail.com.au (Dianne Gorman) AWPA
<URL:http://www.ozemail.com.au/~dkgsoft/html/index.html>